import axios from '@/utils/request'

// 使用mock模拟请求
export const addPostCart = (params) => axios.post('/api/postTest', params)
export const addGetCart = (params) => axios.get('/api/getTest', { params })

export const testPosts = (params) =>
	axios.post('https://jsonplaceholder.typicode.com/posts', params)

export const testPuts = (params) =>
	axios.put('https://jsonplaceholder.typicode.com/posts/1', params)

export const testDelete = () =>
	axios.delete('https://jsonplaceholder.typicode.com/posts/1')

// 演示
// export const xxx = (id) => axios.delete(`/api/xxx/${id}`) // 删除
// export const xxx = (params) => axios.put('/api/xxx', params) // 更新
